package com.dd.cloud.common.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @author zk
 */
public class PageVo<T> extends Page<T> {

    public PageVo(long current, long size) {
        super(current, size);
    }

    /**
     * 自定义分页偏移量
     */
    private long offset = -1;

    /**
     * 扩展字段
     */
    private Object extend;

    public long getOffset() {
        return offset;
    }

    public void setOffset(long offset) {
        this.offset = offset;
    }

    public Object getExtend() {
        return extend;
    }

    public void setExtend(Object extend) {
        this.extend = extend;
    }

    @Override
    public long offset() {
        if (offset == -1) {
            return super.offset();
        }
        return this.offset;
    }
}
